package com.geor.gcv.core.process;

import org.opencv.core.Mat;
import org.opencv.core.Size;
import org.opencv.imgproc.Imgproc;

/**
 * 平滑处理
 * 
 * @author geor.lusongnan
 *
 */
public class SmoothProcess extends Process {
	Process chain;
	Size size;

	public SmoothProcess(Process chain, Size size) {
		this.chain = chain;
		this.size = size;
	}

	public SmoothProcess() {
	}

	@Override
	public Mat process() {
		Mat mat = chain.process();
		Imgproc.blur(mat, mat, size);
		return mat;
	}

	@Override
	public String getProcessName() {
		return chain.getProcessName() + "-->平滑处理";
	}
}
